﻿using System.Xml.Linq;

namespace KnowledgeKiosk.Parsers
{
    /// <summary>
    /// Defines a generalized method for deserializing XML to a type-specific object
    /// </summary>
    /// <typeparam name="T">The type of object to deserialize to.</typeparam>
    public interface IXmlToObjectParser<T>
    {
        /// <summary>
        /// Creates a type-specific object from a XML source.
        /// </summary>
        /// <param name="xml">The XML source to parse.</param>
        /// <returns>A strongly typed object.</returns>
        T Parse(XElement xml);
    }
}